#include <QString>
#include <QIcon>

#include "toolslistmodel.h"
#include "const.h"

void ToolsListModel::addTool(PaintTool *tool)
{
    QStandardItem *item;
    appendRow(item = new QStandardItem(tool->displayText()));
    QString p(RESOURCE_PATH);
    p.append(tool->toolKey()).append(".gif");

    item->setIcon(QIcon(p));
    this->toolList->append(tool);
}
